package com.enation.app.javashop.api.client;

import com.enation.app.javashop.service.payment.WechatSmallchangeManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

/**
 * @author fk
 * @version v2.0
 * @Description: 促销商品api
 * @date 2019/12/02 11:20
 * @since v7.0.0
 */
@RestController
@RequestMapping("/client/wechat/smallchange")
@ApiIgnore
public class WechatSmallchangeClientController {

    @Autowired
    private WechatSmallchangeManager wechatSmallchangeManager;


    @RequestMapping(value = "/auto-send", method = RequestMethod.POST)
    boolean autoSend(@RequestParam("open_id") String openId, @RequestParam("price") Double price, @RequestParam("ip") String ip, @RequestParam("sn") String sn) {

        return wechatSmallchangeManager.autoSend(openId, price, ip, sn);
    }


}
